﻿using OpenWaves.ActivityFeed.Web.Controls;

namespace OpenWaves.ActivityFeed.Web
{
    public class ActivityFeedBuilderFactory: IActivityFeedBuilderFactory
    {
        public ActivityFeedBuilder Create(ActivityFeed.Web.Controls.FeedType feedType, string customFeedTypeName, IActivityFeedService activityFeedService, IUpdateDtoBuilder updateDtoBuilder, string identityName)
        {
            if (feedType == FeedType.Personal) return new PersonalActivityFeedBuilder(identityName, activityFeedService, updateDtoBuilder);
            return new GlobalActivityFeedBuilder(activityFeedService, updateDtoBuilder);
        }
    }
}